package com.ganzalang.gmall.interfacespecification.fourth.exception;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @description:
 * @author: Ganzalang
 * @Date 2021/3/30 20:54
 */
@Slf4j
@RestControllerAdvice
public class ExceptionControllerAdvice {

    @ExceptionHandler(APIException.class)
    public String handler(APIException e) {
        return e.getMessage();
    }
}
